package com.muyu.danmo.service.impl;


import com.muyu.common.core.utils.DateUtils;
import com.muyu.danmo.domain.DanmoTrainingTeacherPicture;
import com.muyu.danmo.mapper.DanmoTrainingTeacherPictureMapper;
import com.muyu.danmo.service.IDanmoTrainingTeacherPictureService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 教师作品图片Service业务层处理
 * 
 * @author kunzong
 * @date 2024-11-26
 */
@Service
public class DanmoTrainingTeacherPictureServiceImpl implements IDanmoTrainingTeacherPictureService
{
    @Autowired
    private DanmoTrainingTeacherPictureMapper danmoTrainingTeacherPictureMapper;

    /**
     * 查询教师作品图片
     * 
     * @param id 教师作品图片主键
     * @return 教师作品图片
     */
    @Override
    public DanmoTrainingTeacherPicture selectDanmoTrainingTeacherPictureById(Long id)
    {
        return danmoTrainingTeacherPictureMapper.selectDanmoTrainingTeacherPictureById(id);
    }

    /**
     * 查询教师作品图片列表
     * 
     * @param danmoTrainingTeacherPicture 教师作品图片
     * @return 教师作品图片
     */
    @Override
    public List<DanmoTrainingTeacherPicture> selectDanmoTrainingTeacherPictureList(DanmoTrainingTeacherPicture danmoTrainingTeacherPicture)
    {
        return danmoTrainingTeacherPictureMapper.selectDanmoTrainingTeacherPictureList(danmoTrainingTeacherPicture);
    }

    /**
     * 新增教师作品图片
     * 
     * @param danmoTrainingTeacherPicture 教师作品图片
     * @return 结果
     */
    @Override
    public int insertDanmoTrainingTeacherPicture(DanmoTrainingTeacherPicture danmoTrainingTeacherPicture)
    {
        danmoTrainingTeacherPicture.setCreateTime(DateUtils.getNowDate());
        return danmoTrainingTeacherPictureMapper.insertDanmoTrainingTeacherPicture(danmoTrainingTeacherPicture);
    }

    /**
     * 修改教师作品图片
     * 
     * @param danmoTrainingTeacherPicture 教师作品图片
     * @return 结果
     */
    @Override
    public int updateDanmoTrainingTeacherPicture(DanmoTrainingTeacherPicture danmoTrainingTeacherPicture)
    {
        danmoTrainingTeacherPicture.setUpdateTime(DateUtils.getNowDate());
        return danmoTrainingTeacherPictureMapper.updateDanmoTrainingTeacherPicture(danmoTrainingTeacherPicture);
    }

    /**
     * 批量删除教师作品图片
     * 
     * @param ids 需要删除的教师作品图片主键
     * @return 结果
     */
    @Override
    public int deleteDanmoTrainingTeacherPictureByIds(Long[] ids)
    {
        return danmoTrainingTeacherPictureMapper.deleteDanmoTrainingTeacherPictureByIds(ids);
    }

    /**
     * 删除教师作品图片信息
     * 
     * @param id 教师作品图片主键
     * @return 结果
     */
    @Override
    public int deleteDanmoTrainingTeacherPictureById(Long id)
    {
        return danmoTrainingTeacherPictureMapper.deleteDanmoTrainingTeacherPictureById(id);
    }
}
